public class demo3 {
    public static void main(String[] args) {
        Thread thread = new Thread(new MyRunnable());
        thread.start();

        while (true){
            System.out.println("正在运行 main 方法");
        }
    }

}
class MyRunnable implements Runnable{
    @Override
    public void run() {
        while (true){
            System.out.println("正在运行 run 方法");
        }
    }
}
